package com.tanguy.user

import android.app.Application
import com.facebook.drawee.backends.pipeline.Fresco
import com.facebook.imagepipeline.core.ImagePipelineConfig
import com.findme.fecedetection.bean.User

/**
 * Created by dab on 2017/9/26 0026 14:31
 */
class App : Application() {

    companion object {
        lateinit var app: App
        fun get(): App = app
    }


    override fun onCreate() {
        super.onCreate()
        app = this
        val config = ImagePipelineConfig.newBuilder(this)
                .setDownsampleEnabled(true)
                .build()
        Fresco.initialize(this,config)
//        initSocket()
    }
val map=HashMap<String,HashMap<String,String>>()
    /**
     * 是否登录
     */
    var isLogin = false
    /**
     * 用户信息(保存在内存)
     */
    var user: User = User()
        set(value) {
            field = value
            isLogin = true
        }



}